﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ShowImports</title>
<link href="../../Content/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
            background-color:White;
        }
    </style>
</head>
<body style="background:#e1d1d6;">

    <div>
    
        <table class="style1" cellspacing="5">
            <tr style="background-color:#507CD1; font-weight:bold; Color:White; text-align:center;">
                <td>
                    Index</td>
                <td>
                    Import Date</td>
                <td>
                    Supplier</td>
                <td>
                    Total Price</td>
                <td>
                    &nbsp;</td>
            </tr>
            <%
                int index = 1; 
                GIFT_SHOP_MVC.Models.GiftShop_LinQDataContext data = new GIFT_SHOP_MVC.Models.GiftShop_LinQDataContext();
                foreach (GIFT_SHOP_MVC.Models.PhieuNhap import in ViewData.Model)
                {
                    GIFT_SHOP_MVC.Models.NhaCungCap supplier = data.GetSupplierById(int.Parse(import.MaNhaCungCap.ToString()));
                    %>
                    <tr style="background-color:#D1DDF1; font-weight:bold; Color:#333333; text-align:center;">
                        <td>
                            <%=index %></td>
                        <td>
                            <%=import.NgayNhap %></td>
                        <td>
                            <%=supplier.TenNhaCungCap%></td>
                        <td>
                            <%=import.TongTien %></td>
                        <td>
                            <a href="../Admin/ShowImportDetail/<%=import.MaPhieuNhap%>" target="detail" ><input type="button" id="submit_btn" value="Detail" /></a></td>
                    </tr>
                <% index++;
                    } %>
        </table>
    
    </div>
</body>
</html>
